package proxyServer;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

public class MyProxyServer {

	public static final int portNumber=5555;
	
	/**
	 * 
	 */
	public void start()
	{
		
		 try  
		    {  
			 Socket clientSocket = null;  
		ServerSocket myServerSocket = new ServerSocket(portNumber,1); 
		while(true)  
		{  
			System.out.println("Starting the MyproxyServer ...");
		   
		        // Create the 2 sockets to transmit incoming  
		        // and outgoing traffic of proxy server  
		    	clientSocket = myServerSocket.accept();   
		  
		        // Create the 2 threads for the incoming  
		        // and outgoing traffic of proxy server  
		        ProxyThread thread = new ProxyThread(clientSocket);  
		        thread.start();  
		        
		    }  
		    }
		    catch(IOException e)  
		    {  
		        //continue  
		        System.exit(-1);;  
		    }  
	}
}

